home *** CD-ROM | disk | FTP | other *** search
- /*//////////////////////////////////////////////////////////////////////
- Filename: setting.js
- Company Name: Computer Associates International, Inc.
- Legal Copyright: Copyright (c) Computer Associates International, Inc.
- Author: Marek Matus (marek.matus@ca.com)
- Product: Tiny Firewall
- Description: global setting
- ///////////////////////////////////////////////////////////////////////*/
-
- /*
- ProductType == 0 && Managed == 0 && IsAdmin == 1 => Multi user rezim
- ProductType == 0 && Managed == 0 && IsAdmin == 0 => Non-privileged user rezim
- ProductType == 0 && Managed == 1 => Non-privileged user rezim
- ProductType == 3 || ProductType == 1 => Single user rezim
- ProductType == 4 => VPN FW rezim
- */
- var _external = window.external; // can be changed to COM object when running in IE
-
- function isLDAPSupported()
- {
- return isServerOS() && isProVersion();
- }
-
- function isUmxUTAInstalled()
- {
- return ("yes" == external.UtaRegValueString("RUPresent"));
- }
-
- function isSpywareProtection()
- {
- return false;
- //return (_external.ProductType == 5); //??
- }
-
- function isVPNFirewall()
- {
- return (_external.ProductType == PROD_TYPE_VPN_FIREWALL);
- }
- /* Returns true if server parser database can be changed. */
- /* Server database cannot be edited in "Non-privileged user mode"*/
- function isSPEditable()
- {
- // return false;
- return ((_external.ProductType == PROD_TYPE_PROFESSIONAL && _external.Managed == 0 && _external.IsAdmin == 1 ) ||
- (_external.ProductType == PROD_TYPE_SINGLE_USER || _external.ProductType == PROD_TYPE_SINGLE_SERVER ) ||
- (_external.ProductType == PROD_TYPE_VPN_FIREWALL ) ||
- isSpywareProtection() );
- }
-
- function isManaged()
- {
- return (_external.Managed != 0);
- }
-
- function isServerOS()
- {
- // return true;
- return _external.IsServerOS();
- }
-
- function isProVersion()
- {
- return (_external.ProductType == PROD_TYPE_PROFESSIONAL);
- }
-
- /* Returns true if it is multi user mode */
- function isMultiUser()
- {
- return _external.ProductType == 0 && _external.Managed == 0 && _external.IsAdmin == 1;
- }
-
- /* Returns true if client parser database should be visibel. */
- /* Client database is invisible in modes: "Single user, VPN " and
- if in user combo is "All Users" selected --> then ClientParser is null */
- function isCPVisible()
- {
- // return false;
- return !((_external.ProductType == PROD_TYPE_SINGLE_SERVER) ||
- (_external.ProductType == PROD_TYPE_SINGLE_USER) ||
- (_external.ProductType == PROD_TYPE_VPN_FIREWALL) ||
- (!_external.ClientParser(XM_FW) && !_external.ClientParser(XM_APPREP) && !_external.ClientParser(XM_SBX)) ||
- isSpywareProtection() );
- }
-
- function showBatchOperation()
- {
- return true;//(_external.ProductType == PROD_TYPE_PROFESSIONAL );
- }
-
- /* Returns true if combo for selecting windows user should be visible */
- function isUsrSelectVisible()
- {
- return (_external.ProductType == PROD_TYPE_PROFESSIONAL && _external.Managed == 0 && _external.IsAdmin == 1);
- }
-
- /* Returns true if column with users should be visible in firewall rules list */
- function showUserColumnInFWRules()
- {
- return (_external.ProductType == PROD_TYPE_PROFESSIONAL && _external.Managed == 0);
- }
-
- /* Returns true if column with users should be visible in firewall rules list */
- function showAccountColumn()
- {
- return (_external.ProductType == PROD_TYPE_PROFESSIONAL && _external.Managed == 0);
- }
-
- function defaultSimpleViewFW()
- {
- return (_external.ProductType == PROD_TYPE_SINGLE_USER || _external.ProductType == PROD_TYPE_SINGLE_SERVER );
- }
-
- function defaultSimpleViewSBX()
- {
- return (_external.ProductType == PROD_TYPE_SINGLE_USER || _external.ProductType == PROD_TYPE_SINGLE_SERVER );
- }
-
- function bothViewAvailableFW()
- {
- return true;//(_external.ProductType == PROD_TYPE_PROFESSIONAL);
- }
-
- function bothViewAvailableSBX()
- {
- return true;//(_external.ProductType == PROD_TYPE_PROFESSIONAL);
- }
-
- function showEasyFWSetting()
- {
- return (_external.ProductType == PROD_TYPE_SINGLE_USER || _external.ProductType == PROD_TYPE_SINGLE_SERVER );
- }
-
- function showEasySBXSetting()
- {
- return (_external.ProductType == PROD_TYPE_SINGLE_USER || _external.ProductType == PROD_TYPE_SINGLE_SERVER );
- }
-
- function isPersonalVersion()
- {
- return (_external.ProductType == PROD_TYPE_SINGLE_USER || _external.ProductType == PROD_TYPE_SINGLE_SERVER );
- }
-
- function isContentFilterVisible()
- {
- return ( window.external.ShowContentFilter == 1);
- }
-
- function isButtonsOnLeft()
- {
- return parseBoolean(external.CfgRegValueString('design_left_btns'));
- }
-
- function is64bitOS()
- {
- //return true;
- return _external.Is64bitOS;
- }
-
- var COLOR_DIRECT_ROW = 'darkblue';
- var COLOR_DB_ROW = 'darkred';
-